export const SPACE_ROLES = {
    owner: {label: '所有者', color: 'red'},
    editor: {label: '编辑者', color: 'blue'},
    viewer: {label: '查看者', color: 'green'}
} as const

export const getRoleText = (role?: string) => {
    if (!role) return '未知'
    return SPACE_ROLES[role as keyof typeof SPACE_ROLES]?.label || role
}

export const getRoleColor = (role?: string) => {
    if (!role) return 'default'
    return SPACE_ROLES[role as keyof typeof SPACE_ROLES]?.color || 'default'
}

